// import lazy from '@tools/lazy';
import { lazy } from "react";

const xhdHomePage = lazy(() => import("@views/viewXHD/xhdHome/xhdHome"));
const xhdPayBackHomePage = lazy(() =>
	import("@views/viewXHD/xhdPayBackHome/xhdPayBackHome")
);
const xhdLoanPage = lazy(() => import("@views/viewXHD/xhdLoan/xhdLoan"));
const RecordList = lazy(() => import("@views/viewXHD/record/recordList/index"));
const RecordLoanList = lazy(() =>
	import("@views/viewXHD/record/newRecordList/loan")
);
const RecordPayList = lazy(() =>
	import("@views/viewXHD/record/newRecordList/pay")
);

const RecordDetail = lazy(() =>
	import("@views/viewXHD/record/recordDetail/index")
);
const xhdLoanResultPage = lazy(() =>
	import("@views/viewXHD/xhdLoan/xhdLoanResult")
);
const xhdPayBackListDetailPage = lazy(() =>
	import("@views/viewXHD/xhdPayBackDetail/xhdPayBackDetail")
);
const xhdEarlyPayPage = lazy(() =>
	import("@views/viewXHD/xhdEarlyRepayment/xhdEarlyRepayment")
);
const XhdUpIdCard = lazy(() => import("@views/viewXHD/xhdUpIdCard"));
const Authentication = lazy(() =>
	import("@/views/viewXHD/credit/authentication")
);
//开通成功
const xhdOpenSuccessPage = lazy(() =>
	import("@views/viewXHD/xhdOpenResult/openSuccess")
);
//失败
const xhdOpenFailPage = lazy(() =>
	import("@views/viewXHD/xhdOpenResult/openFail")
);
//保存联系人
const Linkman = lazy(() => import("@/views/viewXHD/credit/linkman"));
//添加银行卡
const AddBank = lazy(() => import("@/views/viewXHD/credit/addBank"));
// 人脸识别
const Liveness = lazy(() => import("@/views/viewXHD/credit/liveness"));
// 二要素
const TwoElement = lazy(() => import("@/views/viewXHD/credit/twoElement"));
// 请完善您的申请信息
const Authorization = lazy(() =>
	import("@/views/viewXHD/credit/authorization")
);
// 请完善您的申请信息

const XhdBankList = lazy(() => import("@/views/viewXHD/bank/bankList/index"));
const XhdAddBank = lazy(() => import("@/views/viewXHD/bank/addBank/index"));
//借还记录
const LoanAndPayDetail = lazy(() => import("@/views/viewXHD/loanAndPayDetail"));

//常见问题
const xhdCommonProblem = lazy(() =>
	import("@/views/viewXHD/commonProblem/index")
);
const xhdOpenXhfSuccess = lazy(() =>
	import("@/views/viewXHD/xhdOpenResult/openXhfSuccess")
);
let xhdRouters = [
	{
		pathName: "/loanAndPayDetail/:type",
		component: LoanAndPayDetail,
		exact: false
	},
	{
		pathName: "/xhdBankList",
		component: XhdBankList,
		exact: false
	},
	{
		pathName: "/xhdAddBank",
		component: XhdAddBank,
		exact: false,
		cacheRouter: true,
		cacheKey: "XhdAddBank"
	},
	{
		pathName: "/xhd/credit/authorization",
		component: Authorization,
		exact: false,
		cacheRouter: true,
		cacheKey: "/xhd/credit/authorization"
	},
	{
		pathName: "/xhd/credit/twoElement",
		component: TwoElement,
		exact: false,
		cacheRouter: true,
		cacheKey: "/xhd/credit/twoElement"
	},
	{
		pathName: "/xhd/credit/liveness",
		component: Liveness,
		exact: false,
		cacheRouter: true,
		cacheKey: "/xhd/credit/liveness"
	},
	{
		pathName: "/xhd/credit/linkman",
		component: Linkman,
		exact: false,
		cacheRouter: true,
		cacheKey: "/xhd/credit/linkman"
	},
	{
		pathName: "/xhd/credit/addBank",
		component: AddBank,
		exact: false,
		cacheRouter: true,
		cacheKey: "/xhd/credit/addBank"
	},
	{
		pathName: "/xhd/credit/authentication",
		component: Authentication,
		exact: false,
		cacheRouter: true,
		cacheKey: "/xhd/credit/authentication"
	},
	{
		pathName: "/xhdHome",
		component: xhdHomePage,
		exact: false
	},
	{
		pathName: "/xhdPayBackHome",
		component: xhdPayBackHomePage,
		exact: false
	},
	{
		pathName: "/xhdLoan",
		component: xhdLoanPage,
		exact: false,
		cacheRouter: true,
		cacheKey: "xhdLoan"
	},
	{
		pathName: "/xhdRecordList",
		component: RecordList,
		exact: false
	},
	{
		pathName: "/xhdLoanRecordList",
		component: RecordLoanList,
		exact: false
	},
	{
		pathName: "/xhdPayRecordList",
		component: RecordPayList,
		exact: false
	},
	{
		pathName: "/xhdRecordDetail/:cino",
		component: RecordDetail,
		exact: false
	},
	{
		pathName: "/xhdLoanResult",
		component: xhdLoanResultPage,
		exact: false
	},
	{
		pathName: "/xhdPayBackListDetail",
		component: xhdPayBackListDetailPage,
		exact: false,
		cacheRouter: true,
		cacheKey: "xhdPayBackListDetail"
	},
	{
		pathName: "/xhdEarlyPay",
		component: xhdEarlyPayPage,
		exact: false
		// cacheRouter: true
	},
	{
		pathName: "/xhdUpIdCard",
		component: XhdUpIdCard,
		exact: false
		// cacheRouter: true
	},
	{
		pathName: "/xhdOpenSuccess",
		component: xhdOpenSuccessPage,
		exact: false
	},
	{
		pathName: "/xhdOpenFail",
		component: xhdOpenFailPage,
		exact: false
	},
	{
		pathName: "/xhdCommonProblem",
		component: xhdCommonProblem,
		exact: false
	},
	{
		pathName: "/xhdOpenXhfSuccess",
		component: xhdOpenXhfSuccess,
		exact: false
	}
];
export { xhdRouters };
